package com.alpaak.service;

import com.alpaak.dao.UserDao;
import com.alpaak.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 业务实现类
 */
//创建一个名为userService的对象注入到Spring容器中，类似于Component，不指明名字以userServiceImpl为名，可用Scope指定是否单例
@Service("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    public User findUserById(int id) {
        return userDao.findUserById(id);
    }
}
